/**
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
*/
import request from '@/utils/request';
import request2 from '@/utils/request2';
// 模型状态清单上传
export const uploadModelStatus = (aircraftModel: string, data: FormData) => {
  return request({
    url: `/biz/bom/upload-model-status/${aircraftModel}`,
    method: 'post',
    data: data,
    headers: {
      'Content-type': 'multipart/form-data'
    }
  });
};
// 分页查询模型状态清单Vs强度数模清单变更明细
export const getStrengthDetailList = (query) => {
  return request({
    url: `/biz/bom/bom-detail/status-strength-change/${query.aircraftModel}`,
    method: 'get',
    params: query
  });
};
// 分页查询标准装机清单文件列表
export const getStrengthList = (query) => {
  return request({
    url: `/biz/bom/list-bom/${query.aircraftModel}`,
    method: 'get',
    params: query
  });
};
// 生成清单
export const generateList = (data) => {
  return request({
    url: `/biz/bom/bom-generate/${data.aircraftModel}`,
    method: 'post',
    data: data
  });
};
// 导出
export const downloadData = (data) => {
  const obj = { ...data };
  delete obj.aircraftModel;
  return request2({
    url: `/biz/bom/bom-export/MSTS_QBOM_CHANGE/${data.aircraftModel}`,
    method: 'post',
    params: obj,
    responseType: 'blob'
  });
};
